/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.core.figures;

import org.eclipse.draw2d.Graphics;
import org.eclipse.swt.SWT;

import com.cea.papyrus.core.figures.connection.EdgeFigure;

/**
 * Figure of the dependency link.
 * 
 * @author Patrick Tessier
 */
public class LinkFigure extends EdgeFigure {
	
	/**
	 * 
	 */
	private int[] dashes =new int[10];
	
	/**
	 * 
	 */
	public LinkFigure() {
		super();
		
		setLineWidth(1);
		for (int i=0;i<10;i++) {
			dashes[i]=40;
		}
		this.setLineStyle(Graphics.LINE_DASH);
	
	}
	
	
	/*
	 * (non-Javadoc)
	 * @see org.eclipse.draw2d.Shape#paintFigure(org.eclipse.draw2d.Graphics)
	 */
	/**
	 * 
	 * 
	 * @param graphics 
	 */
	@Override
	public void paintFigure(Graphics graphics) {
		//graphics.pushState();
		graphics.setLineStyle(SWT.LINE_DASHDOT);
		//if (dashes != null)
		//	graphics.setLineDash(dashes);
		
		super.paintFigure(graphics);
		//graphics.popState();
	
		
	}
	
	
	
}